import QtQuick 2.6

import "Base/Config"
import Data 1.0
import Cpp.Type 1.0

Item {
    id:mainRoot

    Loader {
        id:loader
        anchors.fill: parent
        source: {
            if(!User.logged)
                return "Login/Login.qml"
            if(!User.isTourist && !User.hasAdminPermission && !User.hasUserPermission)
                return "Login/UserInfo.qml"
            return "Index.qml"
        }
    }

    Component.onCompleted: {
        Size.ratio = Qt.binding(function () {
            return width / 720.0
        })
    }
}
